<template>
  <div class="home">
    <!-- <van-empty style="padding: 0.01rem 0" description=""> </van-empty> -->

    <div style="">
      <div
        class="bb"
        :style="{
          background:
            'url(' + baseImg + ') no-repeat 100%/100% rgba(0, 0, 0, 0.1)',
        }"
      ></div>

      <div style="padding-left: 3rem; padding-top: 11rem">
        <span
          style="
            font-weight: 600;
            font-size: 19px;
            text-align: center;
            color: #fff;
          "
          ><img
            style="width: 4%"
            src="../../assets/images/record-user.png"
          />&nbsp;&nbsp;报备人员：{{ name }}</span >
			<p />
        <span
          style="
            font-weight: 600;
            font-size: 19px;
            text-align: left;
            color: #fff;
          "
        >
          <img style="width: 4%" src="../../assets/images/record-time.png" />
          &nbsp;入连日期：&nbsp;{{ comeDalianTime }}</span>
      </div>
    </div>
  </div>
</template>

<script>
import area from '@/libs/area.json'
import {
  helpUserNewQrCode,
  editQueryCode,
  getMobileRegisterInfo
} from '@/api/self/help'
import { Toast, Dialog } from 'vant'
export default {
  data () {
    return {
      name: '',
      comeDalianTime: '',
      baseImg: '',
      notShow: true,
      formData: {
        queryCode: '',
        verifyQueryCode: '',
        certificatesNo: ''
      }
    }
  },
  mounted () {
    // let url =
    //   'https://dalianoutbreaknew.lngov.top/railway/#/record-info?id=' +
    //   this.$route.query.id
    // console.log('url=====,===', url)
    // this.baseImg = this.$route.query.qrUrl
    this.shaxin()
  },
  methods: {
    shaxin () {
      let data = {
        certificatesNo: this.$route.query.certificatesNo,
        queryCode: this.$route.query.queryCode
      }
      getMobileRegisterInfo(data).then((res) => {
        if (res.data.errcode === 0) {
          // this.formData.queryCode = res.data.data.qr_code
          this.baseImg = res.data.data.qr_code
          this.name = res.data.data.name
          this.comeDalianTime = res.data.data.comeDalianTime
        } else {
          Toast.fail(res.data.errmsg)
        }
      })
    },
    goToRest () {
      this.$router.push({
        name: 'record',
        query: { id: this.$route.query.id, code: this.$route.query.code }
      })
    },
    onSubmit () {
      let data = {
        queryCode: this.formData.queryCode,
        verifyQueryCode: this.formData.verifyQueryCode,
        certificatesNo: this.$route.query.certificatesNo
      }
      editQueryCode(data).then((res) => {
        Toast.clear()
        if (res.data.errcode === 0) {
          this.notShow = false
        } else {
          Toast.fail(res.data.errmsg)
        }
      })
    }
  }
}
</script>
</script>
<style lang="less" scoped>
.bb,
.bb::before,
.bb::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.bb {
  width: 450px;
  height: 450px;
  margin: 600px auto 6px auto;

  /* background: url(baseImg) no-repeat 50%/70% rgba(0, 0, 0, 0.1); */
  color: #cac662;
  // box-shadow: inset 0 0 0 1px rgba(105, 202, 98, 0.5);
}
.bb::before,
.bb::after {
  content: '';
  z-index: 2;
  margin: -5%;
  box-shadow: inset 0 0 0 7px;
  animation: clipMe 8s linear infinite;
}
.bb::before {
  animation-delay: -4s;
}
.bb:hover::after,
.bb:hover::before {
  // background-color: rgba(255, 0, 0, 0.3);
}

@keyframes clipMe {
  0%,
  100% {
    clip: rect(0px, 520px, 2px, 0px);
  }
  25% {
    clip: rect(0px, 2px, 520px, 0px);
  }
  50% {
    clip: rect(518px, 520px, 520px, 0px);
  }
  75% {
    clip: rect(0px, 5100px, 520px, 500px);
  }
}
</style>
<style lang="less" scoped>
.upload-img-5 {
  margin: 5px 0 90px 0;
}
.upload-img-1 {
  margin: 5px 0 15px 0;
}
.home {
  //   background: url('../../assets/images/smtb.jpg')no-repeat;
  background: url('../../assets/images/record-info.png') no-repeat;
  background-size: cover;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  height: 100%;
  img {
    width: 100%;
  }
  .dialog-container {
    height: 70vh;
    overflow-y: auto;
  }
  .get-area {
    width: 100%;
    padding: 0 0.8rem;
    font-size: 0.747rem;
    color: #fff;
    background-color: #1989fa;
    border: 0.053rem solid #1989fa;
    height: 2.347rem;
    line-height: 2.347rem;
    text-align: center;
    border-radius: 0.107rem;
    cursor: pointer;
    box-sizing: border-box;
    margin-right: 10px;
  }
  /deep/.van-field__label {
    width: 8em;
  }
  /deep/.van-field__error-message {
    text-align: right;
  }
  .title {
    // font-size: 28px;
    text-indent: 20px;
    padding: 50px 0 20px;
  }
  .container {
    width: 90%;
    height: 80vh;
    overflow-y: auto;
    border: 1px solid #adadad;
    margin: auto;
    .item {
      margin: 10px;
    }
  }
}
.up-and-down {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f3f4;
  height: 80px;
  color: #333;
}
// .home .blue {
//   background-color: transparent;
// }
// .home .van-cell{
//  background-color: transparent;
// }
</style>
